| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | /** |
||
| 19 | export default class DropdownWithScrollBar { |
||
| 20 | constructor() { |
||
| 21 | const element = $('.dropdown'); |
||
| 22 | const elementItemsList = $('.dropdown-item-list'); |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Adding nicescroll effect to the list |
||
| 26 | */ |
||
| 27 | elementItemsList.niceScroll({ |
||
| 28 | cursorcolor: "#333", |
||
| 29 | cursoropacitymax: 0.5, |
||
| 30 | cursorwidth: "3px", |
||
| 31 | horizrailenabled: false, |
||
| 32 | autohidemode: false, |
||
| 33 | }); |
||
| 34 | |||
| 35 | elementItemsList.hide(); |
||
| 36 | |||
| 37 | element.on("shown.bs.dropdown", function (e) { |
||
|
|
|||
| 38 | elementItemsList.show().resize(); |
||
| 39 | }); |
||
| 40 | |||
| 41 | element.on("hide.bs.dropdown", function (e) { |
||
| 42 | elementItemsList.hide(); |
||
| 43 | }); |
||
| 44 | } |
||
| 45 | } |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.